package com.xiegang.orderservice.controller;

import com.xiegang.internalcommon.dto.OrderInfo;
import com.xiegang.orderservice.mapper.OrderInfoMapper;
import com.xiegang.orderservice.service.OrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xieGang
 * @description
 * @date 2023/4/9 19:02
 **/

@RestController
public class TestController {

    @Autowired
    private OrderInfoService orderInfoService;

    @Autowired
    private OrderInfoMapper orderInfoMapper;
    @GetMapping("/test111/{orderId}")
    public String testdis(@PathVariable("orderId") long orderId){

        System.out.println("orderId:"+orderId);
        OrderInfo orderInfo = orderInfoMapper.selectById(orderId);
        orderInfoService.dispatchRealTimeOrder(orderInfo);
        return "test";
    }
}
